<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<jsp:useBean id="cliente" type="br.uff.javabasico.modelos.Cliente" scope="session" />
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Carrinho do ${cliente.nome}</title>
    </head>
    <body>
        
        <h1>Olá <jsp:getProperty name="cliente" property="nome"/> ( ${cliente.numero} )</h1>
        <br/>
        <h3 style="color:green" >${sessionScope["SUCESSO"]}</h3>
        <hr/>
        <form action="/Trabalho2/index.jsp" name="formulario" method="POST">
            <div>
                <input type="submit" value="Verificar Novo Carrinho" name="Novo">
            </div>
        </form>
        <h2>Lista Fechada de Itens</h2>
        <br/>
        <table border="4" style="position:center">
            <tr>
                <td><b>Número do(s) Item(s):</b></td>      
            </tr>
            <c:forEach items="${cliente.listaDeItens}" var="item">
                <tr>
                    <td>
                        ${item}
                    </td>
                </tr>
            </c:forEach>
        </table>
        
        
    </body>
</html>